import request from "@/api/request";

export default {
    getMyCourseList() {
        return request({
            url: `/course/course/getMyCoursesById`,
            method: 'get',
        })
    },
    getOKOrderCourseIds() {
        return request({
            url: `/order/order/getOKOrderCourseIds/`,
            method: 'get'
        })
    },
    createCode(courseid,coursename,price){
        return request({
            url:`/pay/pay/createCode`,
            method: 'get',
            params:{
                courseId: courseid,
                coursename: coursename,
                 //测试支付金额固定为1分钱，真实上线环境再改回此真实价钱：
            }
        })
    },
    saveOrder(payOrderVo){
        return request({
            url:`/order/order/saveOrder`,
            method:'put',
            data: payOrderVo
        })
    },
    checkOrderStatus(orderId){
        return request({
            url:`/pay/pay/checkOrderStatus/${orderId}`,
            method:'get',
        })
    }
}
